<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:replace="/common/layout :: header(~{::title},~{::link},~{::style})">
    <link th:href="@{/plugins/ztree/css/metro/zTreeStyle.css}" rel="stylesheet"/>
</head>
<body>
<div style="margin: 15px;" class="fadeInUp animated">
    <fieldset class="layui-elem-field layui-field-title">
        <legend>添加角色</legend>
    </fieldset>
    <form class="layui-form layui-form-pane">
        <div class="layui-form-item">
            <label class="layui-form-label">角色名称</label>
            <div class="layui-input-4">
                <input type="text" name="roleName" lay-verify="required" placeholder="请输入角色名称" class="layui-input" autocomplete="off">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">角色编号</label>
            <div class="layui-input-4">
                <input type="text" name="roleCode" lay-verify="required" placeholder="请输入角色编号" class="layui-input" autocomplete="off">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">启用状态</label>
            <div class="layui-input-block">
                <input type="radio" name="status" lay-filter="status" checked value="1" title="开启">
                <input type="radio" name="status" lay-filter="status" value="0" title="关闭">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">排序</label>
            <div class="layui-input-2">
                <input type="text" name="sort" value="50" placeholder="排序编号" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">备注</label>
            <div class="layui-input-4">
                <textarea name="remark" placeholder="请输入描述" class="layui-textarea"></textarea>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">菜单权限</label>
            <div class="layui-input-block">
                <div id="menuTree" class="ztree treeselect"></div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-input-block">
                <button type="button" class="layui-btn" lay-submit="" lay-filter="add-btn">立即提交</button>
                <a href="javascript:goList();" class="layui-btn layui-btn-primary">返回</a>
            </div>
        </div>
    </form>
</div>
<script th:replace="/common/layout :: bottom-script"></script>
<script th:src="@{/plugins/ztree/js/jquery.ztree.all-3.5.js}"></script>
<script th:inline="javascript">
    var postUrl = apiRouter.roleAdd;
    var roleId = 0;
</script>
<script th:src="@{/admin/js/role/role.js}" charset="utf-8"></script>
</body>
</html>